package com.android.model.upload;

import com.android.bean.Good;
import com.android.bean.ImageBean;
import com.android.bean.ResponseData;

import java.io.File;
import java.util.List;

import io.reactivex.rxjava3.core.Observable;
import okhttp3.MultipartBody;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

public interface UpHttp_interface {
    @Multipart
    @POST("tran/image/upload")
    @Headers({"appId:16ea3e8748a548628bacc7f143351473",
            "appSecret:5364653d0a53fe8ed4851b7729770ca1c7f6f"})
    Observable<ResponseData<ImageBean>> sendUpImage(@Part List<MultipartBody.Part> fileList);

    @POST("tran/goods/add")
    @Headers({"appId:16ea3e8748a548628bacc7f143351473",
            "appSecret:5364653d0a53fe8ed4851b7729770ca1c7f6f"})
    Observable<ResponseData<Good>> sendAddGoods(@Body Good goods);

}
